from lxml import etree


def html_parse(html, xpath_regex):
    """
    解析html，返回对应数据
    :param html: 要解析的html
    :param xpath_regex: 解析的对应格式，xpath表达式
    :return:
    """
    etree_html = etree.HTML(html)
    xpath = etree_html.xpath(xpath_regex)
    return xpath
